<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //ES6中允许从数组中提取值，按照对应位置，对变量赋值，对象也可以实现解构
        let [a,b,c] = [1,2,3];
        console.log(a);
        console.log(b);
        console.log(c);

        let [foot] = [];
        let [bar,foo] = [1];
        console.log(foot);
        console.log(bar);
        console.log(foo);
    </script>
</body>
</html>